/*
 * Copyright (c) GoKeep by gokeep.org. 2022-2023. All rights reserved
 */
package org.gokeep.common.document;

import org.springframework.data.annotation.Id;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class HistoryMessage {
    // 集合名称
    public static final String COLLECTION_NAME_TEMP = "history-message-%s";

    @Id
    private String id;
    /**
     * 消息序列号
     */
    private long serializeNo;

    /**
     * 时间戳，主要用于查询
     */
    private long timestamp;

    /**
     * 发送人
     */
    public String from;
    /**
     * 接收人
     */
    public String to;

    /**
     * 是否为群组消息
     */
    public boolean isGroupMessage;

    /**
     * 发送到群组的ID
     */
    public String groupId;
    /**
     * 发送消息数据体
     */
    public byte[] message;
}